<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>

<style>
	tr:hover {
		background: white;
		color: black;
	}
</style>
<title>Маршрут №${route.number}</title>
<a href="routes">
	<div class="mybutton">
		К маршрутам
	</div>
</a>
<br><br><br>
<table>
<tr>
	<th>Номер</th>
	<th>Название</th>
	<th>Статус</th>
	<th>Маршрут</th>
</tr>
<tr>
	<td>${route.number}</td>
	<td>${route.name}</td>
	<c:if test="${route.active == true}">
		<td>Активен</td>
	</c:if>
	<c:if test="${route.active == false}">
		<td>Неактивен</td>
	</c:if>
	<td>
		<c:forEach items="${stops}" var="stop" varStatus="i">
			${stop.name} <c:if test="${i.index != stops.size() - 1}">&#9658</c:if>
		</c:forEach>
	</td>
</tr>
</table>
<br>
<a href="route_delete?id=${route.id}"> 
	<div class="mybutton">
		Удалить
	</div>
</a>
<a href="route_edit?id=${route.id}"> 
	<div class="mybutton">
		Изменить информацию
	</div>
</a>
<%@ include file="/WEB-INF/jsp/footer.jsp" %>